import { routes, resetRouter } from "@/router/index"

export default {
    namespaced: true,
    state: {
        menuList: [...routes]  // 存入动态筛选过后的路由表
    },
    mutations: {
        setMenuList(state, asyncRoutes) {
            state.menuList = [...routes, ...asyncRoutes]
        },
        // 退出清空路由
        resetMenu(state) {

            state.menuList = routes
            resetRouter()
        }
    }
}